<?php
namespace app\validate;

use think\Validate;

class OrderValidate extends Validate
{
    protected $rule = [
        'order_id' => 'integer',
        'user_account' => 'max:20',
        'order_type' => 'in:0,1,2',
        'status' => 'in:0,1,2,3,4',
        'page' => 'integer',
        'limit' => 'integer',
    ];

    protected $message = [
        'order_type.in' => '无效的订单类型',
        'status.in' => '无效的订单状态',
    ];
}